package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.FeedBack;
import com.cskaoyan.service.wx.WxFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

/**
 * @author pengyehua
 * @date 2020/12/8 16:17
 */

/**
 * 反馈问题
 */
@RestController
public class WxFeedbackController {

    @Autowired
    WxFeedbackService wxFeedbackService;

    @RequestMapping("wx/feedback/submit")
    public BaseRespVo submit(@RequestBody FeedBack feedBack,HttpSession session){
        String name =(String) session.getAttribute("name");
        wxFeedbackService.submitFeedback(feedBack,name);
        return BaseRespVo.ok();
    }

}
